const http = require('http');
const pmx = require('pmx')
const port = 10086;

const server = http.createServer((req, res) => {
  res.statusCode = 200;
  res.setHeader('Content-Type', 'text/plain');
  res.end('Hello World\n');
});

pmx.init();

server.listen(port, () => {
  console.log(`Server running at ${port}/`);
});

process.on('SIGINT', () => {
	console.log(arguments)
})

process.on('uncaughtException', (err) => {
  console.log(err);
});

process.on('exit', (code) => {
  console.log(`About to exit with code: ${code}`);
});